﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jeopardy.Models;

namespace Jeopardy.ViewModels
{
    class QuestionNodeViewModel
    {
        /// <summary>
        /// Question node to convert to view.
        /// </summary>
        private IQuestionNode _questionNode;

        /// <summary>
        /// Constructor takes question node as parameter.
        /// </summary>
        /// <param name="questionNode">The question node to display.</param>
        public QuestionNodeViewModel(IQuestionNode questionNode)
        {
            this._questionNode = questionNode;
        }

        /// <summary>
        /// HasQuestion property.
        /// </summary>
        public bool HasQuestion
        {
            get { return _questionNode.HasQuestion; }
        }

        /// <summary>
        /// HasAnswer property.
        /// </summary>
        public bool HasAnswer
        {
            get { return _questionNode.HasAnswer; }
        }

        /// <summary>
        /// Answer property.
        /// </summary>
        public string Answer
        {
            get { return _questionNode.Answer; }
        }

        /// <summary>
        /// Question Property.
        /// </summary>
        public string Question
        {
            get { return _questionNode.Question; }
        }
    }
}
